package com.example.beans;

import org.springframework.beans.factory.annotation.Autowired;


public class Boy {

    private Girl girl;

    public Boy() {
        System.out.println("Boy被实例化");
    }

    @Autowired
    public void setGirl(Girl girl) {
        this.girl = girl;
    }

    public void sayHello(){
        System.out.println("Hello, I'm boy");
    }
}
